Import('env')

sample_env = env.Clone()
sample_env['objroot'] += '/sample'
sample_env['srcroot'] += '/eventrpc'
sample_env['extension'] = 'cpp'
sample_env.Append(CPPPATH=[sample_env['srcroot'],
  env['objroot'] + '/sample'])
sample_env.Append(LIBPATH=[env['objroot']+'/eventrpc',])
sample_env.Prepend(LIBS=
  [
    'eventrpc',
  ])

env.ProtocolBuffer('echo.proto')
sample_src_files = [
  'echo_message_client',
  'echo_message_server',
  'echo_client',
  'echo_server',
]
for file in sample_src_files:
  sample_env.Program(file, [file + '.cpp', 'echo.pb.cc'])
